/*
 * @Description: 
 * @Author: Sang Hao
 * @Date: 2021-09-15 17:11:30
 * @LastEditTime: 2021-10-27 13:35:48
 * @LastEditors: Sang Hao
 */
#ifndef LIDAR_SLAM_SUBSCRIBER_KEY_FRAME_SUBSCRIBER_HPP_
#define LIDAR_SLAM_SUBSCRIBER_KEY_FRAME_SUBSCRIBER_HPP_

#include <deque>
#include <string>
#include <ros/ros.h>

#include <geometry_msgs/PoseWithCovarianceStamped.h>

#include "lidar_slam/sensor_data/key_frame.hpp"

namespace lidar_slam {
class KeyFrameSubscriber {
private:
	/* data */
	ros::NodeHandle nh_;
	ros::Subscriber subscriber_;
	std::deque<KeyFrame> new_key_frame_;
private:
	void msg_callback(const geometry_msgs::PoseWithCovarianceStampedConstPtr& 
		key_frame_msg_ptr);
public:
	KeyFrameSubscriber(ros::NodeHandle nh, std::string topic_name, size_t buff_size);
	KeyFrameSubscriber() = default;
	void ParseData(std::deque<KeyFrame>& key_frame_buff);
};
}

#endif